###########
echo "aria2"
if [[ `cat /etc/*-release|grep alpine` ]];then
which aria2c || apk add aria2 && nohup aria2c --enable-rpc --rpc-listen-all &
which git || apk add git -y
which node || apk add node
ps -ef |grep node-server.js|grep -v grep || git clone https://ghproxy.com/https://github.com/ziahamza/webui-aria2.git aria2 && cd aria2 && nohup node node-server.js &
elif [[ `cat /etc/*-release|grep -E 'ubuntu[^ ]*|debian[^ ]*'` ]];then 
which aria2c || apt install aria2 && nohup aria2c --enable-rpc --rpc-listen-all &
which git || apt install git -y
which node || apt install nodejs
ps -ef |grep node-server.js|grep -v grep || git clone https://ghproxy.com/https://github.com/ziahamza/webui-aria2.git aria2 && cd aria2 && nohup node node-server.js &
elif [[ `cat /etc/*-release|grep -E 'centos[^ ]*|fedora[^ ]*'` ]];then 
which aria2c || yum install aria2 && nohup aria2c --enable-rpc --rpc-listen-all &
which git || yum install git -y
which node || yum install nodejs
ps -ef |grep node-server.js|grep -v grep || git clone https://ghproxy.com/https://github.com/ziahamza/webui-aria2.git aria2 && cd aria2 && nohup node node-server.js &
fi
echo '############ http://ip:8888 ###########' 
#w="which";
#ac="nohup aria2c --enable-rpc --rpc-listen-all &"
#g="git clone https://ghproxy.com/https://github.com/ziahamza/webui-aria2.git aria2 && cd aria2 && node node-server.js"
#pe="ps -ef |grep node-server.js|grep -v grep"